﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ViewModels = FaultDiagnosisSystem.Models.ViewModels;

namespace FaultDiagnosisSystem.BLL
{
    public class LifeLeft
    {
        DAL.LifeLeft dal = new DAL.LifeLeft();
        /// <summary>
        /// 获取最新的剩余寿命数据
        /// </summary>
        /// <returns></returns>
        internal IList<ViewModels.LifeLeft> GetLastLifeData()
        {
            return dal.GetLastLifeData();
        }

        /// <summary>
        /// 获取指定时间点之前一年的周期剩余寿命数据，共四次，在每季度尾取数据
        /// </summary>
        /// <returns></returns>
        internal List<ViewModels.LifeLeft>[] GetCycleLifeDataArray(DateTime day)
        {
            return dal.GetCycleLifeDataArray(day);
        }
    }
}